package com.engine.config;

import com.engine.init.Globle;
import lombok.extern.slf4j.Slf4j;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

@Slf4j
@Component
@ConfigurationProperties(prefix = "engine")
public class EngineConfig {

    public static final int NO_TOKEN_REQUIRED=0;

    public static final int NEED_TOKEN_BY_REDIS=1;

    public static final int NEED_TOKEN_BY_TOKEN_TABLE=2;

    public static final int VECTOR_BUFFER_OFF=0;

    public static final int VECTOR_BUFFER_ON=1;

    private int tokenConfig;

    private int vectorBuffer;

    public int getTokenConfig() {
        return tokenConfig;
    }

    public void setTokenConfig(int tokenConfig) {
        this.tokenConfig = tokenConfig;
        Globle.tokenConfig=tokenConfig;
    }

    public int getVectorBuffer() {
        return vectorBuffer;
    }

    public void setVectorBuffer(int vectorBuffer) {
        this.vectorBuffer = vectorBuffer;
        Globle.vectorBuffer=vectorBuffer;
    }
}
